.reading-records-container {
  padding: 0;
  background: #f5f7fa;
  min-height: calc(100vh - 64px);

  .search-card {
    margin-bottom: 16px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);

    .ant-card-head {
      border-bottom: 1px solid #f0f0f0;
      
      .ant-card-head-title {
        font-size: 16px;
        font-weight: 600;
        color: #262626;
      }
    }

    .search-form {
      .form-row {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 12px 16px;
        margin-bottom: 12px;

        &:last-child {
          margin-bottom: 0;
        }

        .form-item {
          display: flex;
          align-items: center;
          gap: 8px;

          label {
            font-size: 14px;
            color: #595959;
            white-space: nowrap;
            min-width: 60px;
            text-align: right;
            flex-shrink: 0;
          }

          .ant-input,
          .ant-select,
          .ant-picker {
            flex: 1;
          }

          &.form-actions {
            justify-content: flex-start;
            gap: 12px;

            .ant-btn {
              margin: 0;
            }
          }

          .ant-input,
          .ant-select,
          .ant-picker {
            &:hover {
              border-color: #40a9ff;
            }

            &:focus,
            &.ant-input-focused,
            &.ant-select-focused,
            &.ant-picker-focused {
              border-color: #1890ff;
              box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.1);
            }
          }
        }
      }
    }
  }

  // 统计卡片
  .stats-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 16px;

    .stat-card {
      border-radius: 8px;
      box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
      transition: all 0.3s ease;

      &:hover {
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
        transform: translateY(-2px);
      }

      .ant-card-body {
        padding: 20px;
      }

      .stat-content {
        display: flex;
        justify-content: space-between;
        align-items: center;

        .stat-info {
          .stat-label {
            font-size: 14px;
            color: #8c8c8c;
            margin-bottom: 8px;
          }

          .stat-value {
            font-size: 28px;
            font-weight: 600;
            color: #262626;
          }
        }

        .stat-icon {
          width: 56px;
          height: 56px;
          border-radius: 12px;
          display: flex;
          align-items: center;
          justify-content: center;
          font-size: 24px;

          &.reading {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: #fff;
          }

          &.processing {
            background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
            color: #fff;
          }

          &.success {
            background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
            color: #fff;
          }

          &.info {
            background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
            color: #fff;
          }
        }
      }
    }
  }

  .table-card {
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);

    .table-toolbar {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 16px;
      padding-bottom: 16px;
      border-bottom: 1px solid #f0f0f0;

      .toolbar-title {
        font-size: 16px;
        font-weight: 600;
        color: #262626;
      }

      .ant-btn {
        border-color: #d9d9d9;

        &:hover {
          color: #40a9ff;
          border-color: #40a9ff;
        }
      }
    }

    .ant-table {
      // 表格滚动条样式
      .ant-table-container {
        .ant-table-body,
        .ant-table-content {
          scrollbar-width: thin;
          scrollbar-color: #d9d9d9 transparent;
          scrollbar-gutter: stable;

          &::-webkit-scrollbar {
            width: 8px;
            height: 8px;
          }

          &::-webkit-scrollbar-track {
            background: #f0f0f0;
            border-radius: 4px;
          }

          &::-webkit-scrollbar-thumb {
            background: #d9d9d9;
            border-radius: 4px;
            
            &:hover {
              background: #bfbfbf;
            }
          }

          &::-webkit-scrollbar-corner {
            background: transparent;
          }
        }
      }

      .ant-table-thead > tr > th {
        background: #fafafa;
        font-weight: 600;
        color: #262626;
        border-bottom: 2px solid #f0f0f0;
        padding: 16px;

        &:first-child {
          border-radius: 8px 0 0 0;
        }

        &:last-child {
          border-radius: 0 8px 0 0;
        }

        // 固定列样式
        &.ant-table-cell-fix-right {
          background: #fafafa;
          box-shadow: -2px 0 8px rgba(0, 0, 0, 0.08);
        }
      }

      .ant-table-tbody > tr {
        transition: all 0.3s ease;

        &:hover {
          background: #f5f7fa;

          td {
            background: transparent;
          }

          // 固定列悬停时保持背景色
          td.ant-table-cell-fix-right {
            background: #f5f7fa;
          }
        }

        td {
          padding: 16px;
          border-bottom: 1px solid #f5f5f5;

          // 固定列样式
          &.ant-table-cell-fix-right {
            background: #fff;
            box-shadow: -2px 0 8px rgba(0, 0, 0, 0.08);
          }
        }
      }

      // 读者信息单元格样式
      .user-info-cell {
        display: flex;
        align-items: center;
        gap: 12px;

        .ant-avatar {
          flex-shrink: 0;
          width: 40px;
          height: 40px;
          background: #1890ff;
        }

        .user-details {
          display: flex;
          flex-direction: column;
          gap: 2px;
          min-width: 0;
          flex: 1;

          .username {
            font-size: 14px;
            font-weight: 500;
            color: #262626;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
          }

          .user-id {
            font-size: 12px;
            color: #8c8c8c;
          }
        }
      }

      // 图书信息单元格样式
      .book-info-cell {
        display: flex;
        align-items: center;
        gap: 12px;

        .book-cover {
          flex-shrink: 0;
          width: 40px;
          height: 56px;
          border-radius: 4px;
          overflow: hidden;
          box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);

          img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            display: block;
          }
        }

        .book-details {
          display: flex;
          flex-direction: column;
          gap: 4px;
          min-width: 0;
          flex: 1;

          .book-name {
            font-size: 14px;
            font-weight: 500;
            color: #262626;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
          }
        }
      }

      // 进度条单元格
      .progress-cell {
        padding-right: 8px;
      }

      // 阅读时长样式
      .reading-time {
        font-weight: 500;
        color: #1890ff;
      }

      .ant-tag {
        border-radius: 4px;
        padding: 2px 8px;
        font-size: 12px;
        border: none;
      }

      .ant-btn-link {
        color: #1890ff;
        padding: 0;

        &:hover {
          color: #40a9ff;
        }
      }
    }

    .ant-pagination {
      margin-top: 24px;
      text-align: right;

      .ant-pagination-total-text {
        margin-right: auto;
      }

      .ant-pagination-item {
        border-radius: 4px;
        border-color: #d9d9d9;

        &:hover {
          border-color: #1890ff;

          a {
            color: #1890ff;
          }
        }

        &.ant-pagination-item-active {
          background: #1890ff;
          border-color: #1890ff;

          a {
            color: #fff;
          }
        }
      }

      .ant-pagination-prev,
      .ant-pagination-next {
        border-radius: 4px;

        &:hover {
          .ant-pagination-item-link {
            color: #1890ff;
            border-color: #1890ff;
          }
        }
      }
    }
  }

  // 响应式设计
  @media (max-width: 1200px) {
    .search-form {
      .form-row {
        grid-template-columns: repeat(3, 1fr);
      }
    }

    .stats-cards {
      grid-template-columns: repeat(2, 1fr);
    }
  }

  @media (max-width: 768px) {
    padding: 16px;

    .search-card,
    .table-card {
      .ant-card-body {
        padding: 16px;
      }
    }

    .search-form {
      .form-row {
        grid-template-columns: 1fr;
        gap: 12px;

        .form-item {
          flex-direction: column;
          align-items: stretch;

          label {
            text-align: left;
            margin-bottom: 4px;
          }

          .ant-input,
          .ant-select,
          .ant-picker,
          .ant-btn {
            width: 100% !important;
          }
        }
      }
    }

    .stats-cards {
      grid-template-columns: 1fr;
    }

    .table-toolbar {
      flex-direction: column;
      gap: 12px;
      align-items: stretch !important;
    }

    // 读者信息和图书信息响应式
    .ant-table {
      .user-info-cell {
        gap: 8px;

        .ant-avatar {
          width: 32px !important;
          height: 32px !important;
          font-size: 14px;
        }

        .user-details {
          .username {
            font-size: 13px;
          }

          .user-id {
            font-size: 11px;
          }
        }
      }

      .book-info-cell {
        gap: 8px;

        .book-cover {
          width: 32px;
          height: 44px;
        }

        .book-details {
          .book-name {
            font-size: 13px;
          }
        }
      }
    }
  }

  @media (max-width: 480px) {
    .stats-cards {
      .stat-card {
        .stat-content {
          .stat-info {
            .stat-value {
              font-size: 24px;
            }
          }

          .stat-icon {
            width: 48px;
            height: 48px;
            font-size: 20px;
          }
        }
      }
    }
  }
}
